#ifndef CONN_HELPER_H_
#define CONN_HELPER_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <proto_head.h>
#include <lsi.h>

int send_connect_res(struct LSI* lsi, lsi_ip_t dest, int32_t address, int result);

int send_disconnect_ntf(struct LSI* lsi, lsi_ip_t dest, int32_t address, int reason);

/*
*	return = 0: success
*	return < 0: fail
*/
typedef int (*serializer)(void* pkg_ptr,  char* buffer, size_t* buffer_len);

int send_pkg_ntf(struct LSI* lsi, lsi_ip_t dest, int32_t address,  serializer sr, void* pkg_ptr);

#ifdef __cplusplus
}
#endif

#endif // CONN_HELPER_H_



